<template>
  <el-input class='defaultStyle'  :placeholder="placeholder" v-model="input" :style="cssstyle" :disabled="disabled"></el-input>
</template>
<script>
export default {
  name: "Input",
  data() {
    return {
      input: "",
    };
  },
  props: {
    cssstyle: {
      type: Object,
      default() {
        return {};
      }
    },
    placeholder: {
      type: String,
      default: "请输入"
    },
    field: {
      type: String,
      default: ""
    },
    disabled: {
      type: Boolean,
      default:false
    }
  },
  watch: {
    input(val) {
      this.$emit("click", { val: val, field: this.field });
    }
  }
};
</script>
<style lang="scss" scoped>
.defaultStyle{
width: 150px;
}
</style>
